home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Textra116 / Scripts / JForth_Scripts / nextcolon.textra < prev    next >
Encoding:
Text File  |  1996-09-27  |  1.4 KB  |  54 lines

  1.     /*******************************************************************
  2.      *      TEXTRA-AREXX script -- Mike Haas, 1993, Public Domain   .  *
  3.      *                                                                 *
  4.      *      For use with TEXTRA, the GUI-based Amiga Text Editor.      *
  5.      *                                                                 *
  6.      *  If you enhance or write your own Textra scripts, please send   *
  7.      *   to me... especially if you want them added to the package.    *
  8.      *******************************************************************/
  9.  
  10. /*
  11. ** This script is handy for JForth programmers and 
  12. ** is compatible with all versions of Textra.
  13. **
  14. ** It will find and highlight the next-occurring colon
  15. ** definition IF the ':' operator is in the 1st column.
  16. ** Especially useful when assigned to a Textra Function
  17. ** key or CTRL-key macro.
  18. **
  19. ** Also selects :struct definitions, anything
  20. ** that begins with a ':' in the first column.
  21. ** (:CLASS, for example?)
  22. **
  23. ** Mike Haas, Oct 7, 1993
  24. **
  25. ** This program is hereby placed in the public domain.
  26. **
  27. */
  28.  
  29. options results
  30.  
  31. done = 0
  32.  
  33. do while (done == 0)
  34.  
  35.     checkcancel; if (result == CANCEL) then exit
  36.     
  37.     find ":"
  38.     if result == "OK" then  do
  39.  
  40.         get select position
  41.         parse var result stx' 'sty' 'enx' 'eny
  42.     
  43.         if (stx == 0) then do
  44.             hopselect next word
  45.             done = 1
  46.         end
  47.     
  48.     end
  49.     else
  50.         done = 1
  51.     
  52. end
  53.     
  54.